#ifndef DEEPCMP_H
#define DEEPCMP_H

#include "engine/engine.h"
class DeepCMP
{
public:
    DeepCMP();
    ~DeepCMP();

    nn_error_e LoadModel(const char *model_path);                        // 加载模型
    nn_error_e Run(const char *audio_file, std::vector<std::vector<float>> &mel_spectrogram); // 运行模型

private:
    nn_error_e Preprocess(const char *audio_file, std::vector<std::vector<float>> &mel_spectrogram);                                   // 图像预处理
    nn_error_e Inference(std::vector<std::vector<float>> &mel_spectrogram, tensor_data_s &tensor);                                                      // 推理
    // nn_error_e Postprocess(const cv::Mat &img, std::vector<Detection> &objects); // 后处理

    // void process_outputs(const std::vector<tensor_data_s>& inputs,
    //     std::vector<tensor_data_s>& outputs,
    //     STFTResult& result);
    
    tensor_data_s input_tensor_;
    std::vector<tensor_data_s> output_tensors_;
    std::vector<int32_t> out_zps_;
    std::vector<float> out_scales_;
    std::shared_ptr<NNEngine> engine_;
};

typedef struct _nn_object_s {
    float x;
    float y;
    float w;
    float h;
    float score;
    int class_id;
} nn_object_s;



#endif // RK3588_DEMO_DeepFIR_H